<template>
  <div class="">
    <el-container style="height: 500px; border: 1px solid #eee">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu 
        :default-openeds="['1']"
         :router="true"
         active-text-color="blue"
         text-color="gray"
        >
            <el-menu-item index="/homeon" id="text">
            <i class="el-icon-message"></i>
            首页
            </el-menu-item>


          <el-submenu index="/shopmanage">
            <template slot="title">
              <i class="el-icon-menu"></i>商品
            </template>
            <el-menu-item-group>
              <el-menu-item index="/shopmanage">商品管理</el-menu-item>
              <el-menu-item index="/shopcategory">品类管理</el-menu-item>
            </el-menu-item-group>
          </el-submenu>



          <el-submenu index="/order">
            <template slot="title">
              <i class="el-icon-setting"></i>订单
            </template>
            <el-menu-item-group>
              <el-menu-item index="/order">订单管理</el-menu-item>       
            </el-menu-item-group>
          </el-submenu>
     


         <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-user"></i>用户
            </template>
              <el-menu-item index="/userlist">用户列表</el-menu-item>        
          </el-submenu>

           <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-menu"></i>图表
            </template>
              <el-menu-item index="/echarts">echarts图表</el-menu-item> 
               <el-menu-item index="/Bmap">Baidu地图</el-menu-item>           
          </el-submenu>
       </el-menu>
      </el-aside>

      <el-container>
        <el-header style="text-align: right; font-size: 12px; background:#eee;border-bottom:2px" >
          <el-dropdown  @command="handleCommand">
            <i class="el-icon-user-solid"></i>
            <span style="font-size:16px;color:#333">
              欢迎，admin
              <i class="el-icon-caret-bottom"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item command="a">退出登录</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
         
        </el-header>
        <router-view></router-view>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// import { Request } from "@/until/request";
import { home } from "@/request/http";
  export default {
      name:"Home",
    data() {
      return {
        
      }
    },
    methods:{
       handleCommand(command){
          this.$router.push("/login")
       }
       
    }     
  };
</script>

<style>
#text
{
  color: gray !important;
}
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }
  
  .el-aside {
    color: #333;
  }
</style>